package com.party.service;

import com.party.common.base.ApiResult;
import com.party.common.entity.MyPage;
import com.party.entity.PbDevice;
import com.party.entity.PbUser;
import com.baomidou.mybatisplus.extension.service.IService;
import com.party.entity.PbUserResourceHistory;
import com.party.entity.dto.*;
import com.party.entity.vo.SelectDeviceVo;
import com.party.entity.vo.SelectUserVo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 * 客户信息表 服务类
 * </p>
 *
 * @author ccl
 * @since 2024-10-25
 */
public interface PbUserService extends IService<PbUser> {

    //系统登录
    ApiResult login(ReqLoginDto loginReqDao);
    //系统退出
    void logout(String loginId, HttpServletRequest request);

    //保存数据
    ApiResult add(PbUser pbUser);

    //编辑数据
    ApiResult edit(PbUser pbUser);

    //删除数据
    boolean delete(Long id);

    //用户详情
    PbUser detail(Long id);

    //分页数据查询
    MyPage<PbUser> queryPage(QueryUserDto queryUserDto);

    //更新用户启停状态
    boolean updateStatus(PrOnOffDto prOnOffDao);

    //重置密码
    boolean resetPassword(Long id);

    //修改密码
    boolean modifyPassword(ModifyPasswordDto modifyPasswordDao);

    //用户下拉框
    List<SelectUserVo> userSelect();

    //分配设备
    boolean distribute(DistributeDto dto);

    MyPage<PbUserResourceHistory> getResourceRecord(QueryUserDto dto);

    MyPage<PbDevice> getDeviceList(QueryUserDto dto);

    //发布
    boolean publish(PublishBannerDto dto);

    List<SelectDeviceVo> selectDevice(Long id);

    ApiResult importDistribute(MultipartFile file,String id);
}
